/**
 * Created by Administrator on 2016/8/3 0003.
 */
'use strict';
import React,{Component} from 'react';
import {Text,View,StyleSheet,StatusBar,ToastAndroid} from 'react-native';

import TopBar from './TopBar';
import RepairListView from './RepairListView';

import ScrollableTabView from 'react-native-scrollable-tab-view';

var api = require("../api/Api.js");
var STORE = require("../utils/Store");

class RepairList extends Component{

    componentDidMount() {
      // TopBar._topShow.bind(this,require('./img/logo.png'),'程传林',require('./img/repair_top.png'));
    }

    //top bar 左边被点击
    _leftImgClick(){
        ToastAndroid.show('chengcl............', 1000);
    }
    //top bar 右边被点击
    _rightImgClick(){
        ToastAndroid.show('chengcl.......right.....', 1000);
    }

    render(){
        return(
           <View style = {styles.container}>
               <StatusBar
                   backgroundColor="#1b91ff"
                   barStyle="light-content"
               />
               <TopBar
                   style={{height:49}}
                   leftImgShow = {true}
                   leftImgUrl = {require('./img/left.png')}
                   midTitle = {'维修'}
                   rightImgUrl={require('./img/repair_top.png')}
                   rightImgShow={true}
                   leftImagClick={this._leftImgClick.bind(this)}
                   rightImgClick = {this._rightImgClick.bind(this)}
               />
              <ScrollableTabView
                  tabBarBackgroundColor={'white'}
                  tabBarUnderlineColor= {'#1b91ff'}
                  tabBarActiveTextColor = {'#1b91ff'}
                  tabBarInactiveTextColor = {'black'}

              >
                  <RepairListView tabLabel="待办维修"/>
                  <RepairListView tabLabel="领取维修"/>
                  <RepairListView tabLabel="已完成维修"/>
              </ScrollableTabView>
           </View>
        );
    }

}


var styles = StyleSheet.create({
    container:{
        flex:1,
        backgroundColor:'#f0f1f5'
    },

});


module.exports = RepairList;
